home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-18 | 6.2 KB | 87 lines | [TEXT/YERK] |
- \ Utility words for Yerk
- \ 10/13/84 CBD Combined with Dump.scr
- \ 12/16/84 CBD Made into a module
- \ 1/04/85 cdn Moved in objList
- \ 7/10/86 cdn Moved in .classes
- \ 9/02/86 cdn Added Option & Shift key features to WORDS
- \ 9/04/86 ghs Added pat
- \ 12/04/87 rfl modified .cline to use better format and increased clist size
- \ 12/04/87 rfl fixed dump format
- \ 10/02/90 rfl .pause now in nucleus
- \ 10/26/91 rfl added class hierarchy
- \ 12/14/91 rfl modified .class to not be reentrant..runs out of stack
- \ 12/1
- THEN
- THEN
- UNTIL ind ;
-
- : classTrav { ind -- }
- BEGIN ?terminal
- IF (key) drop cr .pause (key)
- cr 0 -> out 32 > IF exit THEN
- THEN
- ind .cline
- ind ?sub \ does it have a subclass?
- IF 1 ++> level -> ind \ yes, so dip down and save last class index
- ELSE findPeer -> ind \ otherwise find next peer
- THEN
- ind not
- UNTIL ;
-
- : .cl size: clist 0 DO i at: clist cr nfa id. LOOP ;
-
- : .classes 0 -> level 0 -> #obs
- 400 heap> Ordered-Col -> cList
- fillClist size: clist 1- classTrav level 0 do drop loop cr cr
- size: clist ." number of classes is " . cr
- #obs ." number of objects is " . cr
- dispose> cList ;
-
- rect pbox
-
- \ Display the system pen patterns
- : pat { \ pattern -- }
- 0 -> pattern -curs cls
- 1 8 50 38 put: pbox 6 0
- DO 7 0
- DO pattern 38 = IF 3 sysPat +base call PenPat THEN
- 55 0 offset: pbox pattern sysPat fill: pbox draw: pbox
- getBotX: pbox 38 - getBotY: pbox 9 + gotoxy pattern .
- 1 ++> pattern
- LOOP
- -385 40 offset: pbox
- LOOP
- 0 sysPat +base call PenPat
- CR +curs
- ;
-
-
- \ ************
- \ : (chain) { myobj \ tab -- } cr 0 -> tab
- \ BEGIN 2 ++> tab myObj sfa @ -> myObj
- \ myObj nfa n>count 2dup tab spaces type cr " OBJECT" s=
- \ UNTIL ;
-
- : (chain) { myObj \ tab -- } 40 heap> ordered-col -> clist
- cr 0 -> tab myObj add: clist
- BEGIN myObj sfa @ -> myObj
- myObj add: clist
- myObj nfa n>count " OBJECT" s=
- UNTIL
- size: clist 0
- DO 2 ++> tab last: clist nfa n>count tab spaces type cr
- size: clist 1- remove: clist
- LOOP dispose> clist ;
-
- : hc'
- @word count sfind
- IF drop (chain) THEN ;
-
- : hier " List class hierarchy of class:" doInDlg
- IF sFind 0= Abort" not found"
- drop ?isclass IF (chain) ELSE abort" not a class" THEN
- THEN ;
-
-
- ;Module
-